package ml.kupin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 页面展示Controller
 * Created by 小柯(Allen Kerr) on 17.4.24 16:52.
 */
@Controller
public class PageController {

    /**
     * 返回首页
     *
     * @return
     */
    @RequestMapping("/")
    public String showIndex() {
        return "index";
    }

    /**
     * 返回侧边栏页面
     *
     * @param page
     * @return
     */
    @RequestMapping("/{page}")
    public String showPage(@PathVariable String page) {
        return page;
    }

    /**
     * 返回商品编辑页面
     */
    @RequestMapping("/item-edit")
    public String showItemEditPage() {
        return "item-edit";
    }

}
